package com.shop.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.shop.common.result.Result;
import com.shop.common.result.util.ResultModel;
import com.shop.entity.ExpressDo;
import com.shop.mapper.ExpressDoMapper;
import com.shop.service.ExpressService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.shop.shopEnum.YesOrNoEnum;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 快递表 服务实现类
 * </p>
 *
 * @author 靳 旺
 * @since 2021-01-29
 */
@Service
public class ExpressServiceImpl extends ServiceImpl<ExpressDoMapper, ExpressDo> implements ExpressService {

    @Override
    public ResultModel selectAllExpress() throws Exception {
        QueryWrapper<ExpressDo> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("is_del", YesOrNoEnum.NO.code);
        return Result.successResultModel(baseMapper.selectList(queryWrapper));
    }
}
